<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
  <title>Title</title>
  <base href="<%=basePath%>"/>
  <%@include file="/WEB-INF/views/common/common.jsp" %>
  <script type="text/javascript" src="static/js/model/role.js">
  </script>

</head>
<body>

<%--datagrid--%>
<table id="roleDatagrid"></table>
<%--数据表格工具栏--%>
<div id="roleDatagridToolbar">
  <shiro:hasPermission name="role:save">
  <a data-cmd="roleAdd" href="javascript:;" class="easyui-linkbutton c1"
     data-options="iconCls:'icon-add',plain:true">添加</a>

  <a data-cmd="roleEdit" href="javascript:;" class="easyui-linkbutton c2"
     data-options="iconCls:'icon-edit',plain:true">修改</a>
  </shiro:hasPermission>
  <shiro:hasPermission name="role:delete">
  <a data-cmd="roleDelete" href="javascript:;" class="easyui-linkbutton c3"
     data-options="iconCls:'icon-remove',plain:true">删除</a>
  </shiro:hasPermission>
  <a data-cmd="roleRefresh" href="javascript:;" class="easyui-linkbutton c4"
     data-options="iconCls:'icon-reload',plain:true">刷新</a>
</div>
<%--添加修改模态框--%>
<div id="roleDialog">
  <form id="roleDialogForm">

    <table>
      <input name="id" type="hidden">
      <tr>
        <td>角色名称</td>
        <td>
          <input name="name" required="true" class="easyui-text" style="width:200px">
        </td>
      </tr>
    </table>
  </form>
  <table>
    <tr>
  <%--作为添加已选权限的表格--%>
      <td><table id="appendRowDatagrid"></table></td>
  <%--作为展示所有权限的表格--%>
      <td><table id="showPermissionDatagrid"></table></td>
    </tr>
  </table>

</div>
<%--添加修改模态框的工具栏--%>
<div id="roleDialogToolbar">
  <a data-cmd="roleSave" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-save',plain:true">保存</a>
  <a data-cmd="roleCancel" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-cancel',plain:true">取消</a>
</div>
</body>
</html>
